<form id="add-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
    {:token()}
    <div class="form-group">
        <label for="c-category_id" class="control-label col-xs-12 col-sm-2">{:__('CategoryName')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select id="c-category_id" data-rule="required" class="form-control selectpicker" name="row[category_id]" data-live-search="true">
                {foreach name="articleCategoryData" item="vo"}
                <option value="{$key}" {in name="key" value=""}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>

    <div class="form-group">
        <label for="title" class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="title" name="row[title]" value="" data-rule="required" />
        </div>
    </div>
    <div class="form-group">
        <label for="info" class="control-label col-xs-12 col-sm-2">{:__('Info')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="info" name="row[info]" value="" data-rule="required" />
        </div>
    </div>
    <div class="form-group">
        <label for="c-thumb" class="control-label col-xs-12 col-sm-2">{:__('Thumb')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-thumb" data-rule="" class="form-control" size="50" name="row[thumb]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-thumb" class="btn btn-danger plupload" data-input-id="c-thumb" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-thumb"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-thumb" class="btn btn-primary fachoose" data-input-id="c-thumb" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-thumb"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-thumb"></ul>
        </div>
    </div>
    <div class="form-group">
        <label for="c-video_url" class="control-label col-xs-12 col-sm-2">{:__('VideoUrl')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-video_url" data-rule="" class="form-control" size="50" name="row[video_url]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-video_url" class="btn btn-danger plupload" data-input-id="c-video_url" data-mimetype="video/mp4,video/mp3,video/avi,video/flv,video/wmv" data-multiple="false" data-preview-id="p-video"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-video_url" class="btn btn-primary fachoose" data-input-id="c-video_url" data-mimetype="video/mp4,video/mp3,video/avi,video/flv,video/wmv" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-video_url"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-video"></ul>
        </div>
    </div>

    <div class="form-group">
        <label for="keywords" class="control-label col-xs-12 col-sm-2">{:__('Keywords')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="keywords" name="row[keywords]" value="" />
        </div>
    </div>

    <div class="form-group">
        <label for="describe" class="control-label col-xs-12 col-sm-2">{:__('Describe')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="describe" name="row[describe]" value="" />
        </div>
    </div>

    <div class="form-group">
        <label for="title" class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea class="form-control editor" id="content" name="row[content]"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Isding')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[isding]', ['1'=>__('Ding'), '0'=>__('Noding')],1)}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Isindex')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[isindex]', ['1'=>__('Show'), '0'=>__('Hidden')],1)}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Isrecommend')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[isrecommend]', ['1'=>__('Ding'), '0'=>__('Noding')],1)}
        </div>
    </div>
    <div class="form-group">
        <label for="c-tags" class="control-label col-xs-12 col-sm-2">{:__('Tags')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select id="c-tags" data-rule="" class="form-control selectpicker" name="row[tags][]" data-live-search="true" multiple="">
                <option value="0" selected>请选择标签</option>
                {foreach name="articleTags" item="vo"}
                <option value="{$vo.id}">{$vo.name}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label for="clicks" class="control-label col-xs-12 col-sm-2">{:__('Clicks')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="clicks" name="row[clicks]" value="0" data-rule="" />
        </div>
    </div>
    <div class="form-group">
        <label for="author" class="control-label col-xs-12 col-sm-2">{:__('Author')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="author" name="row[author]" value="{$site.blogger_netname}" />
        </div>
    </div>
    <div class="form-group">
        <label for="c-avatar" class="control-label col-xs-12 col-sm-2">{:__('Avatar')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-avatar" data-rule="" class="form-control" size="50" name="row[avatar]" type="text" value="{$site.blogger_avatar}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-avatar" class="btn btn-danger plupload" data-input-id="c-avatar" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-avatar"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-avatar" class="btn btn-primary fachoose" data-input-id="c-avatar" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-avatar"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-avatar"></ul>
        </div>
    </div>
    <div class="form-group">
        <label for="sort" class="control-label col-xs-12 col-sm-2">{:__('Sort')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" class="form-control" id="sort" name="row[sort]" autocomplete="off" value="0" data-rule=""/>
        </div>
    </div>
    <div class="form-group hidden layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>